
class TypeObject:
    def __init__(self, _type: str) -> None:
        self.type = _type

class TypeInt(TypeObject):
    def __init__(self, value: int) -> None:
        super().__init__("int")
        self.value = int(value)
        
    def add(v1, v2):
        v = v1.value + v2.value
        if v1.type == "float" or v2.type == "float":return TypeFloat(v)
        else: return TypeInt(v)
        
    def sub(v1, v2):
        v = v1.value - v2.value
        if v1.type == "float" or v2.type == "float":return TypeFloat(v)
        else: return TypeInt(v)
        
    def mul(v1, v2):
        v = v1.value * v2.value
        if v1.type == "float" or v2.type == "float":return TypeFloat(v)
        else: return TypeInt(v)
            
    def div(v1, v2):
        v = v1.value / v2.value
        if v1.type == "float" or v2.type == "float":return TypeFloat(v)
        else: return TypeInt(v)

class TypeFloat(TypeObject):
    def __init__(self, value: float) -> None:
        super().__init__("float")
        self.value = float(value)

    def add(v1, v2):
        v = v1.value + v2.value
        if v1.type == "float" or v2.type == "float":return TypeFloat(v)
        else: return TypeInt(v)
        
    def sub(v1, v2):
        v = v1.value - v2.value
        if v1.type == "float" or v2.type == "float":return TypeFloat(v)
        else: return TypeInt(v)
        
    def mul(v1, v2):
        v = v1.value * v2.value
        if v1.type == "float" or v2.type == "float":return TypeFloat(v)
        else: return TypeInt(v)
            
    def div(v1, v2):
        v = v1.value / v2.value
        if v1.type == "float" or v2.type == "float":return TypeFloat(v)
        else: return TypeInt(v)

class TypeNull(TypeObject):
    def __init__(self) -> None:
        super().__init__("null")